<template>
  <div class="processCenterView row">
      <div class="processCenterViewDiv allProcess">
        <span class="processCenterTitle">总流程数</span>
        <span class="processCenterData">{{ processdata.total }}</span>
      </div>
      <div class="processCenterViewDiv allComplete">
        <span class="processCenterTitle">总完成数</span>
        <span class="processCenterData">{{ processdata.finished }}</span>
      </div>
      <div class="processCenterViewDiv averageTime">
        <span class="processCenterTitle">平均用时</span>
        <span class="processCenterData">{{ processdata.average }}</span>
      </div>
      <div class="processCenterViewDiv processIng">
        <span class="processCenterTitle">正在处理数</span>
        <span class="processCenterData">{{ processdata.running }}</span>
      </div>
      <div class="processCenterViewDiv todayComplete">
        <span class="processCenterTitle">今日完成数</span>
        <span class="processCenterData">{{ processdata.todayfinished }}</span>
      </div>
      <div class="processCenterViewDiv corpsePoints">
        <span class="processCenterTitle">僵尸节点数</span>
        <span class="processCenterData">{{ processdata.zombie }}</span>
      </div>
    </div>
</template>
<script>
import BS from '../dataManage'
import { changeKind,changeMsg } from '../vuex/action'
export default {
  data () {
    return{
      processdata:[]
    }
  },
  props:{
    'dataUrl':{
      type:String
    },
    'msg':{
      type:String
    }
  },
  vuex: {
   getters: {
      kind(state) {
        return state.kind
      },
      msg(state){
        return state.msg
      }
    }
  },
  ready(){
    var self = this;
    BS.getTotleView.call(self,self.dataUrl,self.msg,self.kind)
  },
  watch:{
    'msg':function () {
      BS.getTotleView.call(this,this.dataUrl,this.msg,this.kind)
    },
    'kind':function(){
      BS.getTotleView.call(this,this.dataUrl,this.msg,this.kind)
    }
  }
}
</script>

<style scoped>
div.processCenterView {
  width: 100%;
  height: 300px;
  background-color: red;
  float: left;
  margin-top: 24px;
  margin-bottom: 24px;
  border-radius: 10px;
  filter:alpha(opacity=100 finishopacity=50 style=1 startx=0,starty=0,finishx=0,finishy=150) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);
  -ms-filter:alpha(opacity=100 finishopacity=50 style=1 startx=0,starty=0,finishx=0,finishy=150) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);/*IE8*/  
  background:#2ACDCF; /* 一些不支持背景渐变的浏览器 */  
  background:-moz-linear-gradient(left, #769ADC, #2ACDCF);  
  background:-webkit-gradient(linear, 0 0, right bottom, from(#769ADC), to(#2ACDCF));  
  background:-o-linear-gradient(left, #769ADC, #2ACDCF);
}
div.processCenterView div.processCenterViewDiv {
  width: 33.2%;
  height: 50%;
  float: left;
}
div.processCenterView div.allProcess {
  background-color: transparent;
  border-right: 1px solid #2ACDCF;
  border-bottom: 1px solid #2ACDCF;
}
div.processCenterView div.allComplete {
  background-color: transparent;
  border-right: 1px solid #2ACDCF;
  border-bottom: 1px solid #2ACDCF;
}
div.processCenterView div.averageTime {
  background-color: transparent;
  border-bottom: 1px solid #2ACDCF;
}
div.processCenterView div.processIng {
  background-color: transparent;
  border-right: 1px solid #2ACDCF;
}
div.processCenterView div.todayComplete {
  background-color: transparent;
  border-right: 1px solid #2ACDCF;
}
div.processCenterView div span {
  font-size: 18px;
  color: #fff;
  width: 100%;
  height: 50%;
  display: block;
  text-align: center;
}
div.processCenterView div span.processCenterTitle {
    line-height: 75px;
}
div.processCenterView div span.processCenterData {
    color: #fff;
    font-size: 32px;
    width: 100%;
    height: 50%;
    display: block;
    text-align: center;
}
</style>
